package com.mjk.common.core.jdbc.service.idgenerator.impl;

import com.mjk.common.base.model.BaseEntity;
import com.mjk.common.core.jdbc.service.idgenerator.IdGenerator;
import com.mjk.common.util.SnowFlake;

/**
 * 基于雪花算法的主键生成策略
 */
public class SnowFlakeGeneratorImpl implements IdGenerator {

    @Override
    public String getId(BaseEntity entity) {
        return SnowFlake.getUid();
    }
}
